#!/usr/bin/env python
# -*- coding:utf8 -*-
# uncompyle6 version 2.15.1
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.10 (default, Jul  1 2017, 13:36:56) 
# [GCC 4.4.6 20110731 (Red Hat 4.4.6-4)]
# Embedded file name: ./paas/esb/bkcore/migrations/0001_initial.py
# Compiled at: 2017-11-16 15:44:28
from __future__ import unicode_literals
from django.db import models, migrations

class Migration(migrations.Migration):
    dependencies = []
    operations = [
     migrations.CreateModel(name='ComponentSystem', fields=[
      (
       'id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
      (
       'name', models.CharField(max_length=64, verbose_name=u'系统名称')),
      (
       'label', models.CharField(default=b'', max_length=128, verbose_name=u'系统标签', blank=True)),
      (
       'component_admin', models.CharField(default=b'', max_length=128, verbose_name=u'组件开发负责人', blank=True)),
      (
       'interface_admin', models.CharField(default=b'', max_length=128, verbose_name=u'系统接口负责人', blank=True)),
      (
       'system_link', models.CharField(default=b'', help_text=u'标准的HTTP链接，多个以分号分隔', max_length=1024, verbose_name=u'系统链接', blank=True)),
      (
       'belong_to', models.CharField(default=b'', max_length=128, verbose_name=u'系统所属组织', blank=True)),
      (
       'remark', models.TextField(default=b'', verbose_name=u'备注', blank=True))], options={'db_table': 'esb_component_system'
        }),
     migrations.CreateModel(name='ESBBuffetComponent', fields=[
      (
       'id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
      (
       'name', models.CharField(max_length=256, verbose_name=u'名称')),
      (
       'dest_url', models.CharField(max_length=2048, verbose_name=u'目标接口地址')),
      (
       'dest_http_method', models.CharField(max_length=8, verbose_name=u'HTTP请求类型', choices=[('GET', 'GET'), ('POST', 'POST'), ('_ORIG', u'[所有] 透传原始请求类型(不建议使用)')])),
      (
       'favor_post_ctype', models.CharField(default=b'json', max_length=64, verbose_name=u'编码POST参数方式', choices=[('json', 'json'), ('form', 'form')])),
      (
       'extra_headers', models.CharField(default=b'', max_length=2048, verbose_name=u'额外请求头信息', blank=True)),
      (
       'extra_params', models.CharField(default=b'', max_length=2048, verbose_name=u'额外请求参数', blank=True)),
      (
       'registed_path', models.CharField(max_length=255, verbose_name=u'注册到的组件路径')),
      (
       'registed_http_method', models.CharField(max_length=8, verbose_name=u'注册到的请求类型', choices=[('GET', 'GET'), ('POST', 'POST'), ('_ORIG', u'[所有] 透传原始请求类型(不建议使用)')])),
      (
       'submitter', models.CharField(default=b'', max_length=256, null=True, blank=True)),
      (
       'approver', models.CharField(default=b'', max_length=256, null=True, blank=True)),
      (
       'approver_message', models.CharField(default=b'', max_length=1024, null=True, blank=True)),
      (
       'status', models.IntegerField(default=0, verbose_name=u'状态')),
      (
       'mappings_input', models.CharField(default=b'', max_length=1024, blank=True, help_text=u'JSON格式数据', null=True, verbose_name=u'输入Mappings')),
      (
       'mappings_output', models.CharField(default=b'', max_length=1024, blank=True, help_text=u'JSON格式数据', null=True, verbose_name=u'输出Mappings')),
      (
       'last_modified_time', models.DateTimeField(auto_now=True)),
      (
       'created_time', models.DateTimeField(auto_now_add=True)),
      (
       'system', models.ForeignKey(verbose_name=u'所属系统', blank=True, to='bkcore.ComponentSystem', null=True))], options={'db_table': 'esb_buffet_component'
        }),
     migrations.CreateModel(name='ESBBuffetMapping', fields=[
      (
       'id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
      (
       'name', models.CharField(unique=True, max_length=40, verbose_name=u'名称')),
      (
       'type', models.IntegerField(null=True, verbose_name=u'类型', blank=True)),
      (
       'source_type', models.IntegerField(verbose_name=u'源码类型')),
      (
       'source', models.TextField(default=b'', null=True, verbose_name=u'源码', blank=True)),
      (
       'owner', models.CharField(default=b'', max_length=256, null=True, blank=True)),
      (
       'is_active', models.BooleanField(default=True)),
      (
       'last_modified_time', models.DateTimeField(auto_now=True)),
      (
       'created_time', models.DateTimeField(auto_now_add=True))], options={'db_table': 'esb_buffet_component_mapping'
        }),
     migrations.CreateModel(name='ESBChannel', fields=[
      (
       'id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
      (
       'name', models.CharField(help_text=u'通道名称，例如"[CC] 查询业务列表"', max_length=64, verbose_name=u'通道名称')),
      (
       'path', models.CharField(help_text=u'通道请求路径，例如"/cc/get_app_list/"', unique=True, max_length=255, verbose_name=u'通道路径')),
      (
       'method', models.CharField(default=b'', max_length=32, null=True, verbose_name=u'请求类型', blank=True)),
      (
       'component_codename', models.CharField(help_text=u'对应的组件代码，该组件必须注册到ESB平台中，例如 "generic.cc.get_app_list"', max_length=255, verbose_name=u'对应组件代号')),
      (
       'is_active', models.BooleanField(default=True, verbose_name=u'是否开启')),
      (
       'last_modified_time', models.DateTimeField(auto_now=True, verbose_name=u'最后更新')),
      (
       'created_time', models.DateTimeField(auto_now_add=True, verbose_name=u'创建时间')),
      (
       'component_system', models.ForeignKey(verbose_name=u'所属组件系统', to='bkcore.ComponentSystem', null=True))], options={'db_table': 'esb_channel'
        }),
     migrations.CreateModel(name='FunctionController', fields=[
      (
       'id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
      (
       'func_code', models.CharField(unique=True, max_length=64, verbose_name=u'功能code')),
      (
       'func_name', models.CharField(max_length=64, verbose_name=u'功能名称')),
      (
       'switch_status', models.BooleanField(default=True, help_text=u'控制功能是否对外开放，若选择，则该功能将对外开放', verbose_name=u'是否开启该功能')),
      (
       'wlist', models.TextField(default=b'', help_text=u'支持两种格式数据，以逗号、分号分隔的字符串，及JSON格式字符串', null=True, verbose_name=u'功能测试白名单', blank=True)),
      (
       'func_desc', models.TextField(default=b'', null=True, verbose_name=u'功能描述', blank=True)),
      (
       'created_time', models.DateTimeField(auto_now_add=True, verbose_name=u'创建时间'))], options={'db_table': 'esb_function_controller'
        }),
     migrations.CreateModel(name='UserAuthToken', fields=[
      (
       'id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
      (
       'app_code', models.CharField(max_length=128, verbose_name=u'蓝鲸应用编码')),
      (
       'username', models.CharField(max_length=64, verbose_name=u'用户名')),
      (
       'auth_token', models.CharField(max_length=255, verbose_name=u'token内容')),
      (
       'expires', models.DateTimeField(verbose_name=u'token过期时间')),
      (
       'last_accessed_time', models.DateTimeField(auto_now_add=True, verbose_name=u'最后访问时间')),
      (
       'created_time', models.DateTimeField(auto_now_add=True, verbose_name=u'创建时间'))], options={'db_table': 'esb_user_auth_token'
        })]
